package com.nsjr.jrznandroid.nsjr.zixun;
import android.graphics.Color;
import android.os.Bundle;
import android.text.Spannable;
import android.text.SpannableStringBuilder;
import android.text.style.ForegroundColorSpan;
import android.widget.TextView;

import com.jrzn.base.BaseActivity;
import com.nsjr.jrznandroid.R;

public class ZixunActivity extends BaseActivity {
    private TextView tvzhaiyao;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_zixun);
        initTitleIcon("新闻资讯",R.mipmap.login_icon_back,R.mipmap.icon_share,0);
        init();
    }
    private void init(){
        tvzhaiyao=(TextView)findViewById(R.id.tv_zixundte_zhaiyao);
        SpannableStringBuilder builder = new SpannableStringBuilder(tvzhaiyao.getText().toString());
          ForegroundColorSpan redSpan = new ForegroundColorSpan(Color.RED);
        builder.setSpan(redSpan, 0, 4, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
        tvzhaiyao.setText(builder);
    }
}
